package com.htgd.gardenexpo.dao;

import com.htgd.gardenexpo.entity.CommonResult;
import com.htgd.gardenexpo.entity.GeMyFeedback;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.htgd.gardenexpo.page.FeedbackQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 反馈表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-05-09
 */
@Mapper
public interface GeMyFeedbackDao extends BaseMapper<GeMyFeedback> {

    List<GeMyFeedback> querylist(FeedbackQuery feedbackQuery);

    List<GeMyFeedback> getFeedbackByOpenId(@Param("openId") String openId, @Param("type") String type);

    @Select("SELECT COUNT(1) FROM `ge_my_feedback` WHERE type = '咨询建议'")
    long getConsultationAndSuggestionNums();
}
